﻿<common:PageBase
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Demo01.Views"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:prism="using:Microsoft.Practices.Prism.Mvvm"
    xmlns:common="using:Demo01.Common"
    xmlns:Designtime="using:Demo01.Designtime"
    x:Class="Demo01.Views.MainPage"
    prism:ViewModelLocator.AutoWireViewModel="True"
    mc:Ignorable="d">

    <common:PageBase.BottomAppBar>
        <CommandBar IsOpen="True" IsSticky="True">
            <AppBarButton Command="{Binding AboutCommand}" 
                          Visibility="{StaticResource VisibleWhenPhone}"
                          Icon="More" Label="About"/>
            <AppBarButton Icon="OpenFile" Label="Open"
                          Command="{Binding OpenCommand}"/>
        </CommandBar>
    </common:PageBase.BottomAppBar>

    <d:Page.DataContext>
        <Designtime:MainPageViewModel/>
    </d:Page.DataContext>

    <Hub Header="Hello Barcelona" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <HubSection Header="{Binding Value}">
            <DataTemplate>
                <GridView SelectedItem="{Binding Selected, Mode=TwoWay}" ItemsSource="{Binding Items}">
                    <GridView.ItemTemplate>
                        <DataTemplate>
                            <Grid Height="150" Width="150" Background="{Binding Brush}" />
                        </DataTemplate>
                    </GridView.ItemTemplate>
                </GridView>
            </DataTemplate>
        </HubSection>
    </Hub>
</common:PageBase>
